﻿@helper BusinessCategories(IEnumerable<Zatify.Domain.Data.Category> categories)
    {
        var categoriesString = String.Empty;

        foreach (var cat in categories)
        {
            categoriesString += cat.CategoryName + ", ";
        }

        categoriesString = categoriesString.Trim().TrimEnd(',');
    
    <text>@categoriesString</text>
}
@helper TrimText(String text, Int32 trimAfter)
    {
        if (text.Trim().Length > trimAfter)
        {   
    <text>@text.Trim().Remove(trimAfter)...</text>
        }
        else
        {
    <text>@text.Trim()</text>
        }
}
@helper FiveStarsRatingReadonly(double rating)
    {
        for (int i = 1; i <= 5; i++)
        {
            if (i <= rating)
            {
            <span class="rating_star"></span>
            }
            else
            {
            <span class="rating_star_gray"></span>
            }
        }
}